<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
    <button>一个大按钮</button>
    <input type="password" >

</body>
<script>
  var btn=document.querySelector('button');
  var ipt=document.querySelector('input')
  btn.onclick=function(){
    ipt.type='text'
  }

</script>

</html>